/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 页面容器 */
.algebra-container {
  width: 100%;
  min-height: 100vh;
  background-color: #fafafa;
  font-family: "Microsoft YaHei", "Roboto", sans-serif;
}

/* 头部区域 */
.algebra-header {
  position: relative;
  height: 280px;
  overflow: hidden;
}

.algebra-header .header-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://picsum.photos/id/180/1920/280') center center no-repeat;
  background-size: cover;
}

.algebra-header .header-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(24, 144, 255, 0.8), rgba(114, 46, 209, 0.7));
}

.algebra-header .header-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  padding: 0 20px;
}

.algebra-header .main-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.algebra-header .sub-title {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 24px;
}

.algebra-header .math-decoration {
  display: flex;
  gap: 30px;
  font-size: 20px;
  opacity: 0.8;
  cursor: default;
}

.algebra-header .math-decoration span {
  transition: all 0.3s ease;
}

.algebra-header .math-decoration span:hover {
  transform: scale(1.2);
  opacity: 1;
}

/* 主体内容区域 */
.algebra-content {
  width: 1200px;
  margin: -40px auto 60px;
  padding: 0 20px;
  display: flex;
  gap: 24px;
}

/* 左侧章节菜单 */
.chapter-menu {
  flex: 2;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.chapter-menu .menu-header {
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  background-color: #1890ff;
  color: #fff;
  font-size: 18px;
  font-weight: 500;
}

.chapter-menu .menu-header .anticon {
  margin-right: 8px;
  font-size: 20px;
}

.chapter-menu .menu-list {
  padding: 12px 0;
}

.chapter-menu .menu-item {
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: 72px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.chapter-menu .menu-item:hover {
  background-color: #f5f7fa;
}

.chapter-menu .menu-item.active {
  background-color: #e6f7ff;
  border-left-color: #1890ff;
}

.chapter-menu .menu-item.active .chapter-name {
  color: #1890ff;
  font-weight: 500;
}

.chapter-menu .chapter-num {
  font-size: 16px;
  color: #666666;
  width: 80px;
  text-align: center;
}

.chapter-menu .chapter-info {
  flex: 1;
}

.chapter-menu .chapter-name {
  font-size: 16px;
  color: #333333;
  margin-bottom: 4px;
}

.chapter-menu .chapter-desc {
  font-size: 14px;
  color: #666666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chapter-menu .active-indicator {
  width: 4px;
  height: 24px;
  background-color: #1890ff;
  border-radius: 2px;
  display: none;
}

.chapter-menu .menu-item.active .active-indicator {
  display: block;
}

/* 右侧章节详情 */
.chapter-detail {
  flex: 1;
}

.chapter-detail .detail-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  padding: 24px;
  height: 100%;
}

.chapter-detail .card-header {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  font-size: 16px;
  color: #1890ff;
  font-weight: 500;
}

.chapter-detail .card-header .anticon {
  margin-right: 8px;
}

.chapter-detail .card-content h3 {
  font-size: 20px;
  color: #333333;
  margin-bottom: 12px;
}

.chapter-detail .card-content p {
  font-size: 14px;
  color: #666666;
  line-height: 1.6;
  margin-bottom: 24px;
}

.chapter-detail .study-tips {
  background-color: #f5f7fa;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 24px;
}

.chapter-detail .study-tips h4 {
  font-size: 15px;
  color: #722ed1;
  margin-bottom: 8px;
}

.chapter-detail .study-tips ul {
  padding-left: 20px;
  font-size: 14px;
  color: #666666;
}

.chapter-detail .study-tips ul li {
  margin-bottom: 6px;
}

.chapter-detail .study-tips ul li:last-child {
  margin-bottom: 0;
}

.chapter-detail .progress-bar {
  margin-top: 20px;
}

.chapter-detail .progress-bar span {
  display: block;
  font-size: 14px;
  color: #666666;
  margin-bottom: 8px;
}

.chapter-detail .progress-bar .ant-progress {
  width: 100%;
}

/* 底部区域 */
.algebra-footer {
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  border-top: 1px solid #e5e6eb;
}

.algebra-footer p {
  font-size: 14px;
  color: #666666;
}

/* 响应式适配（小屏幕） */
@media (max-width: 1200px) {
  .algebra-content {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .algebra-header {
    height: 220px;
  }

  .algebra-header .header-content .main-title {
    font-size: 28px;
  }

  .algebra-header .header-content .sub-title {
    font-size: 16px;
  }

  .algebra-header .header-content .math-decoration {
    gap: 20px;
    font-size: 18px;
  }

  .algebra-content {
    margin-top: -20px;
    flex-direction: column;
  }

  .chapter-menu .menu-item {
    height: 64px;
  }

  .chapter-menu .chapter-num {
    width: 60px;
    font-size: 14px;
  }

  .chapter-menu .chapter-info .chapter-name {
    font-size: 15px;
  }

  .chapter-menu .chapter-info .chapter-desc {
    font-size: 13px;
  }
}
